package com.niiwoo.civet.trade.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 标的来源枚举
 */
@AllArgsConstructor
@Getter
public enum ProjectTianChengFromSourceEnum {
    APP(0, "APP"),
    H5_ACTIVITY(1, "H5活动"),
    H5_SPEED_LOAN(2, "H5极速借"),
    H5_TAOBAO_SPEED_LOAN(3, "H5淘宝极速借"),
    R360(4, "融360"),
    //卡牛的类型待定，天秤接口文档没有更新
    CARD_NIU(5, "卡牛");

    private Integer type;
    private String desc;
    
    public static ProjectTianChengFromSourceEnum enumOf(Integer code) {
        for (ProjectTianChengFromSourceEnum fromSource : values()) {
            if (fromSource.type.intValue() == code.intValue()) {
                return fromSource;
            }
        }
        return null;
    }
}
